package com.itheima.web.manager;

import com.itheima.service.db.AnalysisByDayService;
import com.itheima.vo.AnalysisSummaryVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

@Component
public class AnalysisManager {

    @DubboReference
    private AnalysisByDayService analysisByDayService;

    // 展示统计数据
    public ResponseEntity findAnalysisSummaryVo() {
        // 调用rpc
        AnalysisSummaryVo vo = analysisByDayService.findAnalysisSummaryVo();
        // 返回vo
        return ResponseEntity.ok(vo);
    }
}
